Extended support for files_lock server app#190
Merged
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR extends support for the files_lock server app by restructuring file lock information and adding support for lock types. The changes modernize the API with better async/await patterns and structured data models.
- Restructured file lock information from scattered properties into a dedicated
NKLockcomplex type - Extended locking methods to support lock type arguments through new
NKLockTypeenum - Updated asynchronous lock method to use modern throwing continuation patterns instead of tuple returns
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| NextcloudKit+FilesLock.swift | Updated lock/unlock methods to support lock types and improved async implementation |
| NextcloudKit+Capabilities.swift | Added support for detecting lock type capabilities from server |
| NKLockType.swift | New enum defining the three types of locks supported by files_lock app |
| Models/NKLock.swift | New structured model representing file lock information |
| Models/NKFile.swift | Simplified lock representation by replacing multiple properties with single NKLock object |
| Models/NKDataFileXML.swift | Updated XML parsing to use new NKLock model instead of individual properties |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
75e6c7d to
074b9c7
Compare
- Restructured file lock information into a dedicated complex type. - Extended existing locking methods to support the lock type argument. - Updated the asynchronous lock method to resemble conventional patters of modern concurrency and error handling. Signed-off-by: Iva Horn <iva.horn@icloud.com>
Signed-off-by: Iva Horn <iva.horn@icloud.com>
a038adf to
525bafe
Compare
mpivchev
approved these changes
Sep 28, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Required for: nextcloud/nextcloudfileproviderkit#124
files_lock documentation: https://github.com/nextcloud/files_lock?tab=readme-ov-file#api